package cn.bluedot.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import cn.bluedot.model.DiseaseTreatment;
import cn.bluedot.service.DiseaseManageService;

/**
 * 疾病管理controller
 * 
 * @author hxp 2019年4月18日 下午7:33:31
 */
@Controller
public class DiseaseManageController {
    @Autowired
    DiseaseManageService diseaseManageService;
    
    /**
     * 显示所有的猪只生病信息
     * @return
     */
    public  List<DiseaseTreatment>  showAllDiseaseTreament(){
        return diseaseManageService.showAllDiseaseTreament();
    }
    /**
     * 按照猪舍查询显示猪只的生病信息
     * @return
     */
    public List<DiseaseTreatment>  showDiseaseTreamentByPigsty(String pigstyno){
        return diseaseManageService.showDiseaseTreamentByPigsty(pigstyno);
    }
    /**
     * 对生病的猪只生病情况进行登记
     * @param diseaseTreatment
     */
    public void recordDisease(DiseaseTreatment  diseaseTreatment) {
        diseaseManageService.recordDisease(diseaseTreatment);
    }
    /**
     * 更新猪的病情状态和处理结果
     * @param diseaseId
     */
    public void updateDiseaseState(DiseaseTreatment  diseaseTreatment){
        diseaseManageService.updateDiseaseState(diseaseTreatment);
    }
}
